{{template "common/header.html" .}}
{{template "common/nav.html" .}}

<section class="main">
    <div class="container">

        <div class="widget">
            <div class="header">注册</div>
            <div class="content">

                <form method="post" action="{{baseUrl}}/user/signup">
                    <div class="field">
                        <label class="label"><span style="color:red;">*&nbsp;</span>用户名</label>
                        <div class="control has-icons-left">
                            <input name="username" id="username" class="input is-success" type="text"
                                   placeholder="请输入用户名" value="{{.Username}}">
                            <span class="icon is-small is-left"><i class="iconfont icon-username"></i></span>
                        </div>
                    </div>

                    <div class="field">
                        <label class="label"><span style="color:red;">*&nbsp;</span>邮箱</label>
                        <div class="control has-icons-left">
                            <input name="email" id="email" class="input is-success" type="text"
                                   placeholder="请输入邮箱" value="{{.Email}}">
                            <span class="icon is-small is-left"><i class="iconfont icon-email"></i></span>
                        </div>
                    </div>

                    <div class="field">
                        <label class="label"><span style="color:red;">*&nbsp;</span>昵称</label>
                        <div class="control has-icons-left">
                            <input name="nickname" id="nickname" class="input is-success" type="text"
                                   placeholder="请输入昵称" value="{{.Nickname}}">
                            <span class="icon is-small is-left"><i class="iconfont icon-username"></i></span>
                        </div>
                    </div>

                    <div class="field">
                        <label class="label"><span style="color:red;">*&nbsp;</span>密码</label>
                        <div class="control has-icons-left">
                            <input name="password" id="password" class="input" type="password" placeholder="请输入密码"
                                   value="{{.Password}}">
                            <span class="icon is-small is-left"><i class="iconfont icon-password"></i></span>
                        </div>
                    </div>

                    <div class="field">
                        <label class="label"><span style="color:red;">*&nbsp;</span>确认密码</label>
                        <div class="control has-icons-left">
                            <input name="rePassword" id="rePassword" class="input" type="password"
                                   placeholder="请再次输入密码" value="{{.RePassword}}">
                            <span class="icon is-small is-left"><i class="iconfont icon-password"></i></span>
                        </div>
                    </div>

                    {{if .ErrMsg}}
                        <div class="field">
                            <div class="control">
                                <strong><p class="help is-danger">{{.ErrMsg}}</p></strong>
                            </div>
                        </div>
                    {{end}}

                    <div class="field">
                        <div class="control">
                            <button id="btnSignUp" class="button is-success" type="submit">注册</button>
                            <a class="button is-dark" href="{{baseUrl}}/user/github/login"><i
                                        class="iconfont icon-github"></i>&nbsp;<strong>推荐使用Github一键登录</strong></a>
                            <a class="button is-text" href="{{baseUrl}}/user/signin">点击这里去登录！</a>
                        </div>
                    </div>
                </form>

            </div>
        </div>


    </div>
</section>

{{template "common/footer.html" .}}
